﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Do_an_C_sharp.GUI
{
    public partial class baocaoxuat : Form
    {
        public baocaoxuat()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int thang = Convert.ToInt32(comboBox1.Text);
            int nam = Convert.ToInt32(comboBox2.Text);
            CRxuat cr=new CRxuat();
            int []par = new int[2];
            par[0]= thang;
            par[1]=nam;
            cr.SetParameterValue(0, par[0]);
            cr.SetParameterValue(1, par[1]);
//cr.ParameterFields.Add("@thang", CrystalDecisions.Shared.ParameterValueKind.NumberParameter, CrystalDecisions.Shared.DiscreteOrRangeKind.DiscreteValue);
  //          cr.ParameterFields.Add("@nam", CrystalDecisions.Shared.ParameterValueKind.NumberParameter, CrystalDecisions.Shared.DiscreteOrRangeKind.DiscreteValue);
            crystalReportViewer1.ReportSource = cr;
        }
    }
}
